#include <stdio.h>

int main()
{
  int n;
  int count = 0;
  int j = 0;
  int a;
  scanf("%d", &n);
  int tmp = n;
  while(tmp > 0)
  {
    tmp /= 10;
    ++count;
  }

  while(n > 0)
  {
    a = n % 10;
    n = n / 10;
    j = j * 10 + a;
  }

  printf("%d", j);

  return 0;
}
